﻿#Question 2
#This part will get all the Hotfixes present inside the Computer System

$hotfix = get-wmiobject -class "Win32_QuickFixEngineering" -namespace "root\CIMV2" -computername .

#Initialising the variable i
$i=0

#Checking the condition if the hotfixes are present
if($hotfix)
{
echo $hotfix

#Getting each hotfix
foreach($objItem in $hotfix)
{
$i=$i+1
}
}

#if i =0
if($i -eq 0)
{
echo ""
echo "There are no Hotfixes present"
echo ""
}

#if i is not 0
else
{
echo ""
echo "There are $i hotfixes present."
echo ""
}
